<%@page import="java.util.TreeMap"%>
<%@page import="java.util.Map"%>
<%@page import="java.io.File"%>
<%
File d = new File(request.getRealPath("") + request.getRequestURI().substring(0, request.getRequestURI().lastIndexOf("/")) + "/");
if (d.isDirectory())
{
	Map<String, String> m = new TreeMap<String, String>();
	for (File f : d.listFiles())
		m.put(f.getName(), (f.isDirectory() ? f.getName() + "/" : f.getName()));

	for (String n : m.keySet())
		out.print("<a href='" + m.get(n) + "' target=_blank>" + n + "</a><br/>");
}
%>